package com.shardingsphere.examples.service.impl;

import com.shardingsphere.examples.entity.User;
import com.shardingsphere.examples.mapper.UserMapper;
import com.shardingsphere.examples.service.UserService;
import com.shardingsphere.examples.util.SnowflakeIdWorker;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;


    @Override
    public void save(User user) {
        userMapper.save(user);
    }

    @Override
    public User findById(Long id) {
        return userMapper.findById(id);
    }
}
